package adapterPattern;

import java.sql.SQLOutput;

public class Client {

    public static void main(String[] args) {
        Computer computer = new Computer();
        // 只有tfcard
        TFCardImpl tfCard = new TFCardImpl();
        // 通过适配器来对tfCard进行适配，将TF包装成SD
        SDAdapterTF sdAdapterTF = new SDAdapterTF(tfCard);
        // 电脑类只能读取sdcard
        String s = computer.readSD(sdAdapterTF);
        System.out.println(s);

        System.out.println("------------------");
        // sd
        SDCardImpl sdCard = new SDCardImpl();
        System.out.println(computer.readSD(sdCard));

    }

}
